package cn.denvie.agent.configsource;

import org.stagemonitor.configuration.source.AbstractConfigurationSource;

/**
 * 系统参数配置源，如果“java -Dname=denvie”中设置的name参数。
 *
 * @author DengZhaoyong
 * @version 1.0.0
 */
public class SystemPropertyConfigurationSource extends AbstractConfigurationSource {

	@Override
	public String getValue(String key) {
		try {
			return System.getProperty(key);
		} catch (SecurityException e) {
		    e.printStackTrace();
			return null;
		}
	}

	@Override
	public String getName() {
		return "Java System Properties";
	}

}